﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Entity
    
    ///数据模型通用字段
{
   public class EntityBase
    {
        public EntityBase()
        {
            this.ID = Guid.NewGuid();
            this.CreateTime = DateTime.Now;
        }
        /// <summary>
        /// 唯一标识
        /// </summary>
        [Key]
        [Required]
        [Column("P01")]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public Guid ID { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        [Required]
        [Column("P02")]
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 锁定时间
        /// </summary>
        [Required]
        [Column("P03")]
        public DateTime LockTime { get; set; }
        /// <summary>
        /// 删除时间
        /// </summary>
        [Column("P04")]
        public DateTime DeleteTime { get; set; }
    }
}
